<template>
  <el-container class="layout-container-demo" style="height: 100vh">
    <el-main>
      <el-scrollbar>
        <el-table :data="tableData">
          <el-table-column prop="id" label="优惠卷编号" />
          <el-table-column prop="shopId" label="店铺id" />
          <el-table-column prop="rule" label="规则类型" />
          <el-table-column prop="ruleDetail" label="规则细节" />
          <el-table-column prop="time" label="有效期" />
          <!-- <el-table-column prop="userList" label="具有用户" />   -->
        </el-table>
      </el-scrollbar>
    </el-main>
  </el-container>
</template>
  
<script lang="ts" setup>
import { ref } from 'vue'
import { getCouponByJwt } from "../../api/coupon/"
import { ElContainer } from 'element-plus';


// 获取个人优惠卷
const Couton = getCouponByJwt({})
let tableData = ref([])
Couton.then((res) => {
  if (res.code === 200) {
    tableData.value = res.data
  }
})


</script>
  
<style scoped>
.layout-container-demo .el-header {
  position: relative;
  background-color: var(--el-color-primary-light-7);
  color: var(--el-text-color-primary);
}

.layout-container-demo .el-aside {
  color: var(--el-text-color-primary);
  background: var(--el-color-primary-light-8);
}

.layout-container-demo .el-menu {
  border-right: none;
}

.layout-container-demo .el-main {
  padding: 0;
}

.layout-container-demo .toolbar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  right: 20px;
}
</style>
  